package com.joe.test_mybatis_plus.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @Description   测试实体类User
 * @Author        Joe
 * @Company       Jycx
 * @CreateDate    2021/8/27 17:06
 */
@Data
public class User extends BaseEntity {
    @Min(value = 1)
    @Max(value = 2)
    private Integer type;
    @NotBlank(message = "姓名不能为空")
    @NotNull(message = "姓名不能为空")
    private String name;
    @Min(value = 0, message = "年龄不能小于0岁")
    private int age;
    @Email(message = "邮箱格式错误")
    private String email;
    @Pattern(regexp = "^1(3|4|5|7|8)\\d{9}$", message = "手机号码格式错误")
    private String phone;

    private BigDecimal lon;
    private BigDecimal lat;


}
